﻿using System;
using Autodesk.Revit.DB;

namespace YJKRevitKernel.CurveUtility.LineGroupSuite
{
	internal class LineGeterBean : ILineGeter
	{
		public Line UseLine
		{
			get
			{
				return this.m_thisLine;
			}
			set
			{
				this.m_thisLine = value;
			}
		}

		internal Line CalculateOffsetLine(double inputOffsetValue)
		{
			XYZ direction = this.m_thisLine.Direction;
			Transform transform = Transform.CreateTranslation(new XYZ(-direction.Y, direction.X, direction.Z) * inputOffsetValue);
			return this.m_thisLine.CreateTransformed(transform) as Line;
		}

		private Line m_thisLine;
	}
}
